<template>
  <div class="over" @click="close">
    <!-- <img :src="imgsour.imgUrl" alt=""> -->
    <img :src="require(`../assets/img/${imgsour.imgUrl}`)" alt="">
    <span>{{imgsour.caption}}</span>
  </div>
</template>

<script>
export default {
  name: "",
  components: {},
  data() {
    return { curr: "", lightBox: false };
  },
  props:{
    imgsour:[],
    close:Function,
  },
  created() {},
  mounted() {},
  methods: {},
};
</script>
<style scoped lang='scss'>
.over {
  position: fixed;
  width: 100vw;
  height: 100vh; 
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  top: 0;
  left: 0;
}
.over img {
  height: 80%;
  width: auto;
}

.over span {
  color: white;
  margin-top: 1rem;
}

.fade-enter-active, .fade-leave-active {
  transition: opacity .5s;
}
.fade-enter, .fade-leave-to {
  opacity: 0;
}

@media only screen and (max-width: 500px) {
  .img {
    width: 80%;
  }
  .over img {
    height: auto;
    width: 90%;
  }
}

@media only screen and (max-width: 800px) and (min-width: 500px) {
  .img {
    width: 30%;
  }
  .over img {
    height: auto;
    width: 90%;
  }
}

</style>
